package com.livi.tools.cas_general_backend.controller;

import com.livi.tools.cas_general_backend.entity.response.Res;
import com.livi.tools.cas_general_backend.entity.response.ResData;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Livi Luo
 */
@RestController
@RequestMapping("/test")
public class TestController {

    @RequestMapping(value = "hello", method = RequestMethod.GET)
    public Res hello() {
        return ResData.success("hello");
    }

    @RequestMapping(value = "err", method = RequestMethod.GET)
    public Res err() {
        int b = 1 / 0;
        return ResData.success("err");
    }

}
